package bat.ke.qq.com.aop;


import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * 源码学院-Fox
 * 只为培养BAT程序员而生
 * http://bat.ke.qq.com
 * 往期视频加群:516212256 暗号:6
 */
@Slf4j
public class AopMethodInterceptor implements MethodInterceptor {
	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		Long  start = System.currentTimeMillis();
		Object result = invocation.proceed();
		log.info("调用时间：" +(System.currentTimeMillis()-start));
 		return result;
	}
}
